const crypto = require('crypto');
var md5 = crypto.createHash('md5');
var message = 'hello world!';
var digest = md5.update(message, 'utf8').digest('hex'); // hex转为十六进制
console.log(digest); // fc3ff98e8c6a0d3087d515c0473f8677